﻿<PageFunction
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sys="clr-namespace:System;assembly=mscorlib" 
    xmlns:res="clr-namespace:Caps.Console.My.Resources"
    x:Class="pgNewOrExisting"
    x:TypeArguments="sys:Boolean"
    KeepAlive="True"
    WindowTitle="{x:Static res:Resources.wiz_txt_NewOrExisting}"
>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="10" />
            <ColumnDefinition />
            <ColumnDefinition Width="10" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="10" />
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="10" />
        </Grid.RowDefinitions>

        <Label Grid.Column="1" Grid.Row="1" Content="{x:Static res:Resources.wiz_txt_NewOrExistingQ}"/>
        <RadioButton GroupName="File" Grid.Column="1" Grid.Row="2" IsChecked="{Binding Path=IsFileConnectionTypeExisting, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Visibility="{Binding Path=FileSelectionVisibility, Mode=OneWay}">
            <TextBlock Text="{x:Static res:Resources.wiz_txt_ExistingDatabaseFile}" TextWrapping="Wrap" />
        </RadioButton>
        <RadioButton GroupName="File" Grid.Column="1" Grid.Row="3" IsChecked="{Binding Path=IsFileConnectionTypeNew, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Visibility="{Binding Path=FileSelectionVisibility, Mode=OneWay}">
            <TextBlock Text="{x:Static res:Resources.wiz_txt_NewDatabaseFile}" TextWrapping="Wrap" />
        </RadioButton>

        <RadioButton GroupName="Database" Grid.Column="1" Grid.Row="4" IsChecked="{Binding Path=IsDatabaseConnectionTypeExisting, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Visibility="{Binding Path=DatabaseSelectionVisibility, Mode=OneWay}">
            <TextBlock Text="{x:Static res:Resources.wiz_txt_ExistingDatabase}" TextWrapping="Wrap" />
        </RadioButton>
        <RadioButton GroupName="Database" Grid.Column="1" Grid.Row="5" IsChecked="{Binding Path=IsDatabaseConnectionTypeNew, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Visibility="{Binding Path=DatabaseSelectionVisibility, Mode=OneWay}">
            <TextBlock Text="{x:Static res:Resources.wiz_txt_NewDatabase}" TextWrapping="Wrap" />
        </RadioButton>
        <RadioButton GroupName="Database" Grid.Column="1" Grid.Row="6" IsChecked="{Binding Path=IsDatabaseConnectionTypeEmpty, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Visibility="{Binding Path=DatabaseSelectionVisibility, Mode=OneWay}">
            <TextBlock Text="{x:Static res:Resources.wiz_txt_EmptyDatabase}" TextWrapping="Wrap" />
        </RadioButton>

        <StackPanel Grid.Column="1"  Grid.Row="7" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,10,0,0">
            <Button Name="backButton" Click="backButton_Click" Padding="5,0,5,0" xml:space="preserve" Content="{x:Static res:Resources.wiz_cmd_Back}"/>
            <Button Name="nextButton" Click="nextButton_Click" Padding="5,0,5,0" Margin="10,0,0,0" xml:space="preserve" IsDefault="True" Content="{x:Static res:Resources.wiz_cmd_Next}"/>
            <Button Name="cancelButton" Click="cancelButton_Click" Padding="5,0,5,0" Margin="10,0,0,0" IsCancel="True" Content="{x:Static res:Resources.wiz_cmd_Cancel}"/>
            <Button Name="finishButton" IsEnabled="False" Padding="5,0,5,0" Margin="10,0,0,0" Content="{x:Static res:Resources.wiz_cmd_Finish}"/>
        </StackPanel>
    </Grid>
</PageFunction>
    
    
    